The present invention relates to data communication devices, and in particular to a method of remotely downloading firmware to a communication device (e.g. a modem) through a communication network.
The provision of data communication services (e.g. Internet, XDSL etc.) necessarily requires the installation of a communication device (e.g. a modem connected to a host personal computerxe2x80x94PC) at an end-user site. Typically, the end-user is provided with a communications application (e.g. a browser) running on the host PC to control data communication sessions using a graphical user interface (GUI). The communications application interacts with the installed communication device using a high level Application Program Interface (API) to access firmware governing the low-level functionality of the communication device. Such firmware is commonly saved in a FLASH memory during manufacture of the communication device, and is run from the FLASH memory.
As in other areas of the software industry, firmware applications are not static. Rather, development is an on-going process of improving algorithms and code to enhance the reliability and functionality of the communication device. However, while updated firmware applications can easily be loaded into new communication devices at the factory, it is difficult to provide upgrade loads to communication devices which have been already sold and delivered to the customer.
U.S. Pat. No. 5,268,928 (Herh, et. al.) teaches a data modem with remote firmware update capabilities. According to Herh et al., the data modem is provided with a read only memory (ROM), and a battery-backed random access memory (RAM). The firmware is divided into a boot-logic which is saved in the ROM, and application logic which is stored in the battery-backed RAM. Update loads of the application logic can be downloaded to the modem during normal operation of the device and stored in the battery-backed RAM. Herh et al. require that the modem be provided with two separate memories, and further require that the data modem have additional circuitry (including a built-in battery) to ensure that the application logic is not lost when the modem is turned off. This increases the cost and complexity of the data modem. Another disadvantage of the data modem taught by Herh et al. is that the boot logic (which enables the data modem to perform its basic functions) are stored in the ROM, and thus cannot be updated during the life of the data modem.
It is preferable to store the firmware (both boot and application logic) in a FLASH memory, which is a non-volatile form of programmable memory. One of the advantages of saving the firmware in FLASH memory is that no special equipment is required to write data to the FLASH memory. The circuitry already provided on the device for normal read/write operations is sufficient. Because the FLASH memory can be used for both read and write operations, is it convenient to run the firmware from the FLASH-memory, which minimizes the requirement for RAM. Furthermore, the FLASH memory retains its information after loss of power, so battery-backup circuits are not required.
FLASH memory is readily available in standard sizes (e.g. 128 kb), and, depending on the addressing limitations of the microprocessor of the communication device, may be logically divided into frames or pages (e.g. of 32 kb each). Typically, each page can be enabled (i.e. accessed for reading or writing data) individually by the microprocessor by means of an appropriate page-select signal applied to one or more page-select input pins on the FLASH memory chip. Each page is further subdivided into individually accessible blocks, which can be accessed by the microprocessor by applying appropriate address-select signals to address-select input pins on the FLASH memory chip. Conveniently, corresponding blocks of every page can be accessed using a common address-select signal, so that any desired block on any page of the FLASH memory can be uniquely accessed by applying appropriate page-select and address-select signals (in combination) to the page-select and address-select input pins of the FLASH memory chip.
During operation of the communication device, the microprocessor holds one page in enabled condition (by holding the page select signal constant), and then reads firmware application logic from blocks of the enabled page by changing the address-select signal (either incrementally or in response to jump commands embedded in application logic). Since a single address-select signal can access a corresponding block of memory on each page, changing the page-select signal (thereby enabling another page) during execution of the application logic will very likely cause erroneous operation of the communication device as the microprocessor attempts to execute the contents of a block of FLASH memory which is located on a page other than the page containing the application logic. As a safety measure to prevent this occurrence, firmware applications are typically written in such a way as to prevent the microprocessor from enabling any other page of the FLASH memory while any portion of the application logic is being run.
It is not possible to write information to a portion of the FLASH memory, while reading information from that same portion of FLASH memory. Thus when the modem is in operating mode, the firmware application is being run (therefore also read) from the FLASH memory, and it is not possible to write an updated firmware load to the FLASH memory. Where the FLASH memory is divided into pages, then during operation of the modem the page which contains the firmware application (or that part of it which is running at that time) is necessarily being held in enabled condition, which precludes saving an updated firmware load to any other page of the FLASH memory.
As a result of the above-noted problems, the method of Herh et al. cannot be used in a data modem in which the firmware is stored in a FLASH memory.
Two other methods are known for updating modem firmware. The first of these is exemplified by U.S. Pat. No. 5,781,921 (Nichols), wherein the updated software is distributed in a removable memory device (e.g. a floppy diskette, or a memory cartridge adapted to connect to the modem). Once the removable memory device has been coupled to the modem, the updated firmware is installed under software control. The second method, which is commonly used in the software industry, requires the end user to download the updated firmware load over the communication network, and then subsequently install the updated load under software control.
Both of these methods have certain drawbacks. The use of a removable memory device is expensive, because copies of the device must be either distributed to each user (and used only once), or service technicians must be hired to perform the upgrade. Downloading updated software (e.g. through the Internet) is commonly used as a means of distributing software updates, but requires intervention by the user. Each of these methods is undesirable because each creates inconvenience for the user. Because of the inconvenience, many users will not attempt to upgrade the firmware unless forced to do so because of problems using the modem, which means that the user is already experiencing dissatisfaction with the modem. Additionally, the manufacturer of the modem is forced to rely on others to distribute and install the update loads, and thus cannot be confident that all customers"" modems are operating with the latest firmware.
There therefore remains a need for a method of updating firmware of a communication device, under remote control and with minimum disruption to the user.
It is an object of the invention to provide a method of remotely updating firmware saved in FLASH memory, with minimum user-perceivable disruption in the operation of the communication device.
It is a further object of the present invention to provide a method of remotely updating firmware saved in FLASH memory, in which operation of the communication device is protected in the event of a failure during an attempted update operation.
Accordingly, an aspect of the present invention provides a method of remotely updating firmware saved in a FLASH memory of a communication device connected to a network, the FLASH memory being partitioned into at least a first and a second portion, a first firmware load being stored in the first portion, the method comprising the steps of, during run-time of the first firmware load: transmitting at least a portion of an updated firmware load through the network to the communication device; temporarily storing the transmitted portion of the updated firmware load in a buffer of the communication device; copying at least a portion of the first firmware load into a random access memory (RAM) of the communication device; triggering execution of the copied portion of the first firmware load from the RAM; and under control of the copied portion of the first firmware load, saving the transmitted portion of the updated firmware load to the second portion of the FLASH memory.
A further aspect of the present invention provides a system for remotely updating firmware saved in a FLASH memory of a communication device connected to a network, the FLASH memory being partitioned into at least a first and a second portion, a first firmware load being stored in the first portion, the system comprising: a server operatively connected to the network and adapted for transmitting at least a portion of an updated firmware load through the network to the communication device; a buffer for temporarily storing the transmitted portion of the updated firmware load; and a microprocessor operative under control of the first firmware load to: copy at least a portion of the first firmware load into a random access memory (RAM) of the communication device; trigger execution of the copied portion of the first firmware load from the RAM; and save the transmitted portion of the updated firmware load to the second portion of the FLASH memory under control of the copied portion of the first firmware load.
A still further aspect of the present invention provides a communication device connected to a network and operative in accordance with firmware saved in a FLASH memory of a communication device, the FLASH memory being partitioned into at least a first and a second portion, a first firmware load being stored in the first portion, the communication device being adapted to enable remote update of the firmware through the network, and comprising: a buffer for temporarily storing a received portion of an updated firmware load; and a microprocessor operative under control of the first firmware load to: copy at least a portion of the first firmware load into a random access memory (RAM) of the communication device; trigger execution of the copied portion of the first firmware load from the RAM; and save the received portion of the updated firmware load to the second portion of the FLASH memory under control of the copied portion of the first firmware load.
In accordance with the present invention, the firmware includes program code responsive to commands received from the manufacturer to begin an update procedure. The update procedure controls the communication device to perform the above-noted steps, substantially without interrupting user-initiated communication sessions.
In an embodiment of the invention, the FLASH memory is divided into a Boot Page, and at least a First and a Second Update Pages. A xe2x80x9cbootxe2x80x9d version of the firmware is installed in the Boot Page at the factory, and is never updated. Updated firmware loads are saved only in the First and Second Update Pages. Accordingly, if a subsequent attempt to update the firmware fails, at least the xe2x80x9cbootxe2x80x9d version of the firmware will remain in uncorrupted condition, and can be used for operation of the communication device. Similarly; successive updates of the firmware are alternately saved in the first and second Update Pages, so that if an attempted update of the firmware fails, the next most recently updated version of the firmware remains uncorrupted and is available for use. An Active Page Flag is stored in the FLASH memory to identify which of the First and Second Update Pages contains the most up-to-date version of the firmware.
In accordance with the present invention, after completion of the update procedure, the updated version of the firmware becomes active upon a subsequent reboot of the communication device. In one embodiment, this is accomplished by the user during their normal use of the communication device: that is, by powering down and later re-booting their PC. In an alternate embodiment, communication device reboot can be accomplished automatically as a final step in the update procedure. Automatic reboot is particularly suitable with xDSL communication devices, because the reboot will generally take less that one or two seconds, and the communication device will automatically re-establish its connection with the CO. The CO will detect the brief interruption in the connection, but will not disconnect any ongoing communication sessions (due to its short duration). Thus the communication device can be rebooted with the updated firmware without disrupting any communication sessions of the user. Depending on the type and data traffic of the communication session being engaged in, the user may not even be aware that the reboot has taken place.